package dao

import (
	"zg3zk3/inits"
	"zg3zk3/model"
)

func GetUser(username, password string) (result *model.User, err error) {
	if err = inits.DB.Where("username=? and password =?", username, password).Find(&result).Error; err != nil {
		return nil, err
	}
	return result, nil
}
